import request from '@/utils/request'

/**
 * 学校登录-分页查询课程列表
 * @param {Object} data
 *
 */
export function teacherCourseLsit(data) {
  return request({
    url: 'course/manage/teacher/pageCourseLsit',
    method: 'post',
    data
  })
}

// 学校登录-分页查询课程列表
export const schoolCourseLsit = params => {
  return request({
    url: '/course/manage/school/pageCourseLsit',
    method: 'post',
    data: params
  })
}

// 创建课程（基本信息）
export function addCourse(params) {
  return request({
    url: '/course/manage/addCourse',
    method: 'post',
    data: params
  })
}

// 课程目录
export const treeCourseCataloglist = params => {
  return request({
    url: '/course/manage/treeCourseCataloglist',
    method: 'post',
    data: params
  })
}

// 当前课程信息
export const courseDetail = params => {
  return request({
    url: '/course/manage/selectCourseById',
    method: 'post',
    data: params
  })
}

// 课程章节课时目录的资料上传
export const addCourseFile = params => {
  return request({
    url: '/course/manage/addCourseFile',
    method: 'post',
    data: params
  })
}

// 课程章节课时目录的资料上传
export const deleteCourseById = params => {
  return request({
    url: '/course/manage/deleteCourseById',
    method: 'post',
    data: params
  })
}
